package it.polimi.digitalstate.dto;



import org.hibernate.validator.constraints.*;

public class PartyDTO implements IDataTransferObject {
		private Integer id;
		@NotEmpty(message="Name of the party cannot be empty")
		private String name;
		@NotEmpty(message="You must upload a Symbol")
		private String symbol;
		@NotEmpty(message="Program of the party cannot be empty, but if u fill up with bullshit like every party does, will be okay.")
		private String program;
		
		public PartyDTO(){
			
		}
		public PartyDTO(String name, String symbol, String program){
			this.name=name;
			this.symbol=symbol;
			this.program=program;
		}
		public PartyDTO(int id,String name, String symbol, String program){
			this.name=name;
			this.symbol=symbol;
			this.program=program;
			this.id=new Integer(id);
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public String getSymbol() {
			return symbol;
		}
		public void setSymbol(String symbol) {
			this.symbol = symbol;
		}
		public String getProgram() {
			return program;
		}
		public void setProgram(String program) {
			this.program = program;
		}
		@Override
		public int getID() {
			if(id==null){
				//throw an exception
			}
			return id.intValue();
		}

}
